package com.bexon.app.IO;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Reader;

public class IntputStreamDemo {

	public static void main(String[] args) {
		File file = new File("E:\\01.txt");
		
		reader(file);
	}

	private static void reader(File file) {
		FileInputStream fis = null;
		try {
			fis = new FileInputStream(file);
			int c = -1;
			while ((c=fis.read())!=-1) {
				System.out.print((char)c);
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				if(fis!=null){
					fis.close();
					fis = null;
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		
	}

}
